import requsest from '@/utils/formdata'

export const uploadAvatar=(form)=>{
    return requsest({
        method:"POST",
        url:"http://localhost:8080/user/uploadAvatar",
        data:form,
     
    }).then(
          response=>{
              if(response.data.success){
                //  this.$store.commit("SHOW",false);
                return response.data.data;  
                 
              }
          },
          error=>{
            console.log("上传失败"+error.message);
          }

        )
}
export const getUserInfo=(form)=>{
    return requsest({
        method:"POST",
        url:"http://localhost:8080/user/uploadAvatar",
        data:form,

    }).then(
        response=>{
            if(response.data.success){
                //  this.$store.commit("SHOW",false);
                return response.data.data;

            }
        },
        error=>{
            console.log("上传失败"+error.message);
        }

    )
}